
i=9
def a():
    i=10
    def b():
        nonlocal i
        i=19
        print("b: %d"% i)
    b()
    print("a: %d" % i)
a()

print("g: %d" % i)